/**
 * title: 实名验证
 */
import React, { Component } from 'react';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import Authentication from './components/Authentication';
import EditBox from '../components/EditBox';
import Result from './components/Result';

class BindEmailWrapper extends Component {
  state = {
    success: false,
  };
  changeStatus = b => {
    this.setState({ success: b });
  };
  render() {
    const { success } = this.state;
    const typeName = this.props.location.query.typeName;
    return (
      <PageHeaderWrapper
        title="实名验证"
      >
      <EditBox title={success ? ' ' : '实名验证'} description={' '}>
        {success ? <Result /> : <Authentication changeStatus={this.changeStatus} typeName= {typeName}/>}
      </EditBox>
      </PageHeaderWrapper>
    );
  }
}
export default BindEmailWrapper;
